1. Field of the Invention
This invention relates to a video coder which encodes source input pictures and a video decoder which decodes coded video bitstream very effectively, and provides a system for effective transmission or storage of the pictures.
2. Description of the Related Art
A conventional representative high efficient video coder is disclosed in MPEG2, an international standard video layer discussed in ISO/IEC JTC1/SC29/WG11. For example, in the April, 1995, issue of "Picture Information Engineering and Broadcasting Technique Television Academy Bulletin", MPEG is featured as a topic theme. On pages 29 to 60 of this bulletin, a coding system of MPEG2 is discussed, referred to therein as "3-2 video compression". Hereinafter, a conventional high efficient coding system is described based on the above identified related art.
FIG. 25, comprising FIGS. 25(a), 25(b) and 25(c) shows an explanatory view of a picture format including sample density rate of luminance and color difference signals. There are three formats in MPEG2, comprising 4:2:0, 4:2:2, or 4:4:4. However, one selected format is not dynamically changed during encoding or decoding.
Furthermore, the 4:4:4 format is defined as a format in MPEG2 as of November 1995. However, it is not defined in a class called profile. That is, it is practically an unused format. In either of the 4:2:0 or 4:2:2 formats, the sample density of the color difference signal is lower than that of the luminance signal. The reason for this is that the discrimination ability of a human being for resolution of luminance is much higher than that of color difference.
FIG. 26 shows a basic configuration of a MPEG coder discussed above. In the figure, an A/D convertor 1, a selector for selecting one of an inter-frame mode and intra-frames mode 16, a Discrete Cosine Transformer (DCT) 4, a quantizer 5, a variable length coder 6, a transmission buffer 7 and a rate controller 8 are provided. A dequantizer 11, an inverse DCT 12, an adder 17, a frame memory 18, and a motion compensated predictor 19 are further provided, forming an added loop comprising a predictive coding means.
FIG. 27 shows a basic configuration of a MPEG decoder of the type discussed above. In the figure, a receiving buffer 9, a variable length decoder 10, a dequantizer 11, an inverse DCT 12, a format convertor 30, and a D/A converter 14 are provided. A frame memory 18, a motion compensated predictor 24, and an adder 17 are further provided, forming a predictive decoding means. DCT transform coefficients 104, quantized index of transform conversion coefficients 105, coded video stream 107, a signal showing the volume of generated information 108, a quantized index 109 showing the decoded form of transform coefficient, a dequantized transform coefficient 110, input picture data 116, predicted residual error picture data 119, decoded picture data 120, motion compensated prediction data 125 and a motion vector 126 are further illustrated in FIGS. 26 and 27.
The operation of the coder of FIG. 26 is described. A source of input pictures are digitized at the A/D convertor 1. This source of input pictures is coded according to DCT and coded with motion compensated prediction. The difference between the input picture data 116 and the motion compensated prediction picture data 125 generated according to motion prediction from a reference picture is obtained and predicted residual error data 117 results therefrom. The predicted residual error in each 8 by 8 macroblock is transformed into transform coefficient 104 in the frequency domain through DCT 4. Then, quantizing is performed using a quantizer 5.
In case of intra-frame coding without motion compensated prediction, the input picture data 116 are directly DCT-coded. Selecting between inter-frame and intra-frame is performed by the selector 16. Since data is used as a reference picture of motion compensated prediction, quantized data 105 is dequantized at the dequantizer 11 and inverse DCT is performed for the information 105 at the inverse DCT module 12. Then, the signal 118 is added to the motion compensated prediction signal 119 by the adder 17. The reference picture is decoded by local decoding and stored in the frame memory 18.
Each 8 by 8 block of DCT coefficients are scanned consecutively from the low frequency components to the high frequency components after one dimensional quantizing. Then, variable length coding is performed at the variable length coder 6 for one dimensional-quantized DCT coefficients and the other coded data like motion vector. For keeping the volume of coded video bitstream stable, a signal showing a volume of generated information 108 from the output buffer 7 is monitored, and the quantizer is controlled through the rate controller as a feedback loop. The coded video stream 107 is obtained from the buffer 7.
The operation of the decoder in FIG. 27 is now described.
The decoding process is basically a reverse operation of the coder. First, the coded video bitstream 107 is stored in the buffer 9. Data in the buffer 9 is read out and decoding is performed at the variable length decoder 10. In this process, signals 109 of DCT coefficients, and motion vectors 126 are decoded and separated. Each 8 by 8 block of DCT coefficients 109 is dequantized by the dequantizer 11 and transformed to picture element data 118 at the inverse DCT module 12. In case of intra-frame coding, the decoded picture can be obtained at this stage.
When motion compensated prediction is performed, current picture data is obtained by adding the motion compensated prediction data 119 based on motion compensated prediction from a reference picture to the output of inverse DCT module 12. The current picture data are stored in a frame memory 18 for a new reference picture.
The above example typifies conventional systems. In this example, coding of an input picture is based on macroblock DCT, wherein sample density rate of luminance and color difference signals are fixed at 4:2:0, or 4:2:2, during the coding. Based on the results of such coding, the following observations may be made. As a principle of operation, degradation of picture quality according to compression is observed in macroblock units. This is because distortion caused in a spatial transform coefficient, according to quantizing, spreads over the whole macroblock according to inverse DCT. Further, this degradation can be observed to emerge clearly in color difference signals. This is because the sample density of the color difference signal is generally lower than that of the luminance signals. If the sample density of the color difference signals is increased, the color distortion is especially improved. On the other hand, the volume of the coding increases, which negatively impacts the compression efficiency.
The present invention solves these and other problems. It is an object of the invention to provide a video coder and a video decoder which reduce color distortion, which provides output which is clear when the compression rate is increased, and can get a higher qualified coding picture without lowering the compression efficiency.